<template>
	<view class="m-flxedmoney">
		<view class="flex-start">
			<view class="u-item" :class="{on: onCreen==index }" v-for="(item,index) in list" :key="index" @click="clickFixedItem(item,index)">
				<text class="num number">{{item}}</text>
				<text class="company">{{company}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"m-fixedmoney",
		props: ['list','company'],
		data() {
			return {
				onCreen:null
			};
		},
		methods:{
			clickFixedItem(value,index){
				this.onCreen = index;
				this.$emit('clickFixedItem',{value:value});
			}
		}
	}
</script>

<style lang="scss">
	.u-item{
		width: 31%;
		text-align: center;
		border-radius: 5px;
		padding: 10px;
		margin-top: 10px!important;
		font-size: 28rpx;
		font-weight: bold;
		background-color: $incolor-4;
		border:2px solid $incolor-4;
		transition: all .2s;
		.num{
			font-size: 40rpx;
		}
		.company{
			font-size: $contentSize;
		}
	}
	.u-item:nth-child(2),.u-item:nth-child(5){
		margin: 0 3%;
	}
	.u-item:active{
		border:2px solid $maincolor-1;
		
		color: $maincolor-1;
	}
</style>
